package org.spider.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author lzy
 * @since 2022-06-02 15:36:46
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("spider_config_field")
@ApiModel(value = "SpiderConfigFieldEntity对象", description = "")
public class SpiderConfigFieldEntity extends Model<SpiderConfigFieldEntity> {

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("字段名称")
    @TableField("field_name")
    private String fieldName;

    @ApiModelProperty("字段描述")
    @TableField("field_remark")
    private String fieldRemark;

    @ApiModelProperty("字段所属表")
    @TableField("field_table")
    private String fieldTable;

    @ApiModelProperty("字段是否必须，1：非必须；2：必须")
    @TableField("field_required")
    private Integer fieldRequired;

    @ApiModelProperty("字段状态，1：被删除；2：正常在用")
    @TableField("field_status")
    private Integer fieldStatus;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
